/**
 * 
 */
package com.aspire.android.heliar.pub.storage;

import java.util.List;

import com.aspire.android.heliar.pub.ContentNode;
import com.aspire.android.heliar.pub.Pub;
import com.aspire.android.heliar.pub.PubAttachment;

/**
 * @author panglei
 * 
 */
public interface PubStorageManager {
	
	public static final String ROOT_PATH = "Heliar";

	public long insertPub(Pub pub);

	public void updatePub(int id, Pub pub);

	public void deletePub(long id);

	public List<Pub> listPubs();

	public Pub getPub(long pub);

	public long insertContentNode(ContentNode contentNode);

	public void updateContentNode(long id, ContentNode contentNode);

	public void deleteContentNode(long id);
	
	public void deleteContentNodesByPubId(long pubId);
	
	public List<ContentNode> listContentNodes(long pubId, long parentId);

	public ContentNode getContentNode(long id);

	public long insertPubAttachment(PubAttachment attachment);

	public void updatePubAttachment(long id, PubAttachment attachment);

	public void deletePubAttachment(long id);
	
	public void deletetPubAttachmentsByPubId(long pubId);
	
	public List<PubAttachment> listPubAttachmentsByPubId(long pubId);

	public List<PubAttachment> listPubAttachments(long contentNodeId);

	public PubAttachment getPubAttachment(long id);

}
